<template>
	<view>
		<view class="mytitle">
			<view>
				<image :src="user.img" @click="xz" mode=""></image>
			</view>
			<view>
				<view>{{user.guanli_hymc}}</view>
				<view>{{user.guanli_sjhm}}</view>
			</view>
		</view>
		<view class="content">
			<view v-for="(item,index) in items" :key="index" @click="go(item.url)">
				<view>
					<view class="iconfont" v-html="item.icon"></view>
					<view>{{item.title}}</view>
				</view>
				<view>
					{{item.msg}}
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import { reactive, toRefs } from 'vue'
	import http from '../../../utils/http.js'
	import store from '../../../store/index.js'
	export default {
		setup(){
			let data = reactive({
				items:[{
					icon:'&#xe673;',
					title:'我的合同',
					url:'/pages/wxz/mys/hetong/hetong',
					msg:''
				},{
					icon:'&#xe601;',
					title:'我的资料',
					url:'/pages/wxz/mys/mymsg/mymsg',
					msg:''
				},{
					icon:'&#xeaf2;',
					title:'关于我们',
					url:'/pages/wxz/mys/about/about',
					msg:''
				},{
					icon:'&#xe600;',
					title:'检测更新',
					url:'/pages/wxz/mys/updata/updata',
					msg:''
				}],
				user:{},
				go:(e)=>{
					// console.log(e)
					uni.navigateTo({
						url: e
					});
				}
				
			})
			return {...toRefs(data)}
		},
		onShow(){
			this.user=store.getters.getUser
			this.user.img=this.user.img==''?'../../../static/logo.png':this.user.img
		}
	}
</script>

<style scoped lang="less">
	@import "~@/static/font/iconfont.css";
.content{
	>view{
		display: flex;
		padding: 20rpx;
		border-bottom: 1px solid #d9d9d9;
		justify-content: space-between;
		>view{
			display: flex;
			>view:first-child{
				width: 50rpx;
				margin: 0 30rpx;
			}
			
		}
	}
}
.mytitle{
	padding: 20rpx 80rpx;
	display: flex;
	border-bottom: 1px solid #d9d9d9;
	image{
		width: 120rpx;
		height: 120rpx;
		margin-right: 30rpx;
	}
	>view>view:first-child{
		margin-top: 5rpx;
		margin-bottom: 25rpx;
	}
}
</style>
